require ("connection.inc");
require ("listc.inc");
require ("club_news.inc");
if (isset($PHP_AUTH_USER)) {
$query=mysql_query("select * from users where nick_name='$PHP_AUTH_USER'") OR DIE (mysql_error());
if (mysql_num_rows($query)==1) {
$row=mysql_fetch_array($query);
$access_level=$row[level];
}
}
if (!$access_level || $access_level==0) $access_level=1;
?>
Новые клубы |
|
$query=mysql_query("select * from clubs where permission=0 order by club_id desc limit 0,5");
while ($row=mysql_fetch_array($query)) {
$s_query=mysql_query("SELECT count(*) as count, unix_timestamp(max(ins_date)) as ldate from messages where phorum_id='$row[club_id]'") OR DIE (mysql_error());
$mes=mysql_fetch_array($s_query);
if ($mes[ldate] > time()-60*60*24) $img="";
else $img="";
if (strlen($row[club_name])>19) $club_name=substr($row[club_name],0,16)."...";
else $club_name=$row[club_name];
echo"$img
$club_name ($mes[count])
";
}
?>
|
|
|
|
|
show_club_news(0); ?>
|
|
Клубы |
|
|
|
|
|
Клубы заявленные к голосованию |
|
If (!$nxtclub) {
$nxtclub=0;
}
$mydate=date("Y-m-d");
$x_query=mysql_query("select id from temp_clubs");
$x_num=mysql_num_rows($x_query);
$query=mysql_query("select * from temp_clubs order by votes DESC limit $nxtclub,3");
$num2=mysql_num_rows($query);
while ($row=mysql_fetch_array($query)) {
echo"
Категория клуба:
|
";
$query3=mysql_query("select club_id, club_name from clubs where club_id='$row[parent_club_id]'") OR DIE (mysql_error());
$row3=mysql_fetch_array($query3);
print" $row3[club_name]";
echo"
|
Название клуба:
|
$row[club_name]
|
Описание клуба:
|
$row[club_discription]
|
Создатель клуба:
|
";
$query2=mysql_query("select id, nick_name from users where id='$row[moderator_id]'");
$row2=mysql_fetch_array($query2);
echo"$row2[nick_name]
|
Проголосовало:
|
$row[votes]
|
Проголосовать за создание
|
|
";
}
If ($x_num>$num2 && $num2>=3) {
print "следующие>>> ";
}
If ($nxtclub>=3) {
print " | <<<предыдущие";
}
?>
|
|
|
|
|
|
|
Самый популярный |
|
|
|
|
|
include ("reklama.inc");
?>
|